package cn.hbu.zlfw.patent.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * 
 * @ClassName: PatentSynergy 
 * @Description: 专利协同申请书
 * @author wpw<1223443289@qq.com>
 * @date 2017年11月2日 下午7:48:13  
 * @version V1.0
 */
@Entity
@Table(name="t_patent_synergy")
public class PatentSynergy	implements Serializable {

	private static final long serialVersionUID = 8171811215074465368L;
	
	@Id
	@Column(name="id",length=32)
	@GeneratedValue(generator="UUID_KEY")
	@GenericGenerator(name="UUID_KEY",strategy="uuid.hex")
	private String id;
	
	@Column(name="abstractInfo",length=5000,nullable=false)
	private String abstractInfo;	//摘要信息
	
	@Column(name="delState",length=20,nullable=false)
	private Integer delState;	//删除状态 1表示已删除，0表示未删除
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="createTime",nullable=false)
	private Date createTime;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="updateTime",nullable=false)
	private Date updateTime;

	@ManyToOne(cascade= {CascadeType.MERGE,CascadeType.PERSIST})	//级联策略
	@JoinColumn(name="p_id")
	private Patent patent;
	
	public Patent getPatent() {
		return patent;
	}

	public void setPatent(Patent patent) {
		this.patent = patent;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getAbstractInfo() {
		return abstractInfo;
	}

	public void setAbstractInfo(String abstractInfo) {
		this.abstractInfo = abstractInfo;
	}

	public Integer getDelState() {
		return delState;
	}

	public void setDelState(Integer delState) {
		this.delState = delState;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Override
	public String toString() {
		return "PatentSynergy [id=" + id + ", abstractInfo=" + abstractInfo + ", delState=" + delState + ", createTime="
				+ createTime + ", updateTime=" + updateTime  + "]";
	}

}
